Calculating Attribute Values

The calculation of an attribute value is the process of merging multiple values into a single value.

The calculation of attribute values takes place on two levels:

For Recipes:

Recipes are items that have other items as ingredients. For certain attributes, like allergens and ingredient types, the attribute values of the ingredients decide the attribute value of the recipe. In that case the recipe does not have an assigned value; it has a calculated value. The Nuts attribute value for a recipe that contains at least one ingredient with Nuts-Yes, is also Yes.

The system calculates recipe attribute values for attributes that are marked as:

  • Value for Recipe - Calculated from Ingredients

On the POS for Journal Items:

Besides calculating values for recipes, when total attribute values are displayed for the journal lines, the values are merged so that for each attribute only one value is shown.

The Calculation Process

The following table shows how the system calculates attribute values based on the value type of the attribute. The same calculation applies to recipe values and to journal values.

Value Type Calculated Value
Text Each unique instance with separator between values, such as Heavy,Light,Big.

Numeric

The sum of the numeric values.
Amount The sum of the amounts.
Date, File Cannot be calculated.
Option Value Each unique instance with separator between values such as Leather,Polyester,Silk.
Table Link Each unique instance with separator between values, such as English,Indonesian,Malaysian.
Weighted Option The option with the highest weight.

Manual calculation for recipes

You can manually calculate attribute values for recipes in the following ways:

To calculate values for one attribute or attribute group

  1. Go to the Attributes or Attribute Groups page.
  2. Select the desired attribute or attribute group .
  3. Click the Assignments action. The Attribute Assignments page appears.
  4. Select the attribute values you want to calculate.
  5. Click the Process action, then click Calculate Attribute Values for Selection.
  6. Confirm the question.

The system calculates for those attribute values that have Yes in the Value Calculated field. When calculation is completed, the system displays the number of values changed.

To calculate values for a recipe

  1. Click the icon, enter Recipe List and select the relevant link.
  2. Select a recipe, and click the Recipe action and then click Attributes.
  3. Click the Calculate Attribute Values action.

The system calculates for those attribute values that have Yes in the Value Calculated field. When calculation is completed, the system displays the number of values changed.

To calculate attribute values for all recipes - saving calculation time on the POS

You can calculate values for all recipes in the system in one go. This could take time depending on the number of recipes in your system. However, if your recipe and attribute data changes very little or not at all, calculating all recipes saves time on the POS. Recipe values are not calculated on the POS if the system knows that all calculated values are up-to-date.

  1. Go to the Attribute Setup page.
  2. Click the Calculate Values for All Recipes action.
  3. Confirm the question.

The system calculates for those attribute values that have Yes in the Value Calculated field. When calculation is completed, the system displays the number of values changed. It also fills in the following fields and check boxes:

  • All Calc. Values Up-to-Date - This check box is now selected, indicating that all values are calculated in the system and no need to perform recipe value calculation on the POS. If any changes are then made to attribute values or ingredients are changed, the check box is cleared; values are not up-to-date anymore.
  • Last Date All Values Calcul. - This field contains the date and time when the function was run.
  • Last Modified - This field contains the last modification date and time.

Note: When ingredients are excluded from a recipe on the POS, an excluded line is added to the journal. When you select to show attribute values for the recipe after the ingredient exclusion, the system recalculates the recipe attribute values (for attributes marked as Calculated from Ingredients) for non-excluded ingredients only.